* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    background: #f5f6f7;
}

/* 修饰header 而不是h1 */
header {
    text-align: center;
    background-color: #0a0a23;
    color: #fff;
    text-transform: uppercase;
    padding: 35px;
    border-bottom: 5px solid #fdb347;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    align-items: center;
    /* 整体居中 */
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 10px;
}

.gallery img {
    /* 
        width: 100%;   # 变为父盒子的宽度1400px
        max-width: 350px;  # 所有img宽度都变为350px
        使图片等宽
     */
    width: 100%;
    max-width: 350px;
    height: 300px;
    /* 确保图像按比例拉伸 */
    object-fit: cover;
    border-radius: 10px;
}

.gallery::after {
    content: "";
    width: 350px;
}